package com.ytjj.qmyx.users.client;

import com.ytjj.common.api.CommonResult;
import com.ytjj.qmyx.users.model.circle.Product;
import com.ytjj.qmyx.users.model.circle.ProductRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 供应链接口
 */
@FeignClient("qmyx-supply-chain")
public interface SupplyChainClient {
    /**
     * 商品详情
     * @param id
     * @return
     */
    @GetMapping("/prodouct/detail")
    Product getById(@RequestParam("id") Integer id);

    /**
     * 商品列表
     * @param request
     * @return
     */
    @PostMapping("/prodouct/all")
    CommonResult queryAll(@RequestBody ProductRequest request);

    /**
     * 商品分类
     * @return
     */
    @GetMapping("/prodouctCategory/list")
    CommonResult selectAll();
}
